#include<iostream>
#include<cmath>
using namespace std;
int main()
{
	long long n;
	long long start;
	cin >> n;
	int maxcnt = 0;
	for(int i = 2; i <= sqrt(n); i++){
		int j = i;
		long long temp = n;
		int cnt = 0;
		while(temp % j == 0){
			temp /= j;
			j++;
			cnt++;
		}
		if(cnt > maxcnt){
			maxcnt = cnt;
			start = i;
		}
	}
	if(maxcnt == 0){
		printf("1\n%lld", n);
	}
	else{
		cout << maxcnt << endl;
		for(int i = 0; i < maxcnt; i++){
			cout << start + i;
			if(i != maxcnt - 1)
				cout << '*';
		}
	}
	return 0;
}
